package com.example.demo.filter;

import jakarta.servlet.*;
import jakarta.servlet.annotation.WebFilter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.annotation.Order;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
import org.springframework.stereotype.Component;

import java.io.IOException;

@Slf4j
@WebFilter()
@Order(1)
//@Component
public class DownLoadFilter implements Filter {

//    @Value("${czh.file.pathpartten}")
//    static String PATH_PATTERN;
//    private static final AntPathRequestMatcher DEFAULT_ANT_PATH_REQUEST_MATCHER =
//            new AntPathRequestMatcher(PATH_PATTERN, "POST");
    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {

        filterChain.doFilter(servletRequest, servletResponse);
    }

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        Filter.super.init(filterConfig);
        log.info("init");
    }
}
